Conditions | 2 |
Total Lines | 12 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { |
||
30 | |||
31 | @Get(':id') |
||
32 | @Roles(UserRole.PHOTOGRAPHER, UserRole.DIRECTOR) |
||
33 | @ApiOperation({ summary: 'Get school' }) |
||
34 | public async index( |
||
35 | @Param() dto: IdDTO, |
||
36 | @LoggedUser() { id }: UserAuthView |
||
37 | ): Promise<SchoolView> { |
||
38 | try { |
||
39 | return await this.queryBus.execute(new GetSchoolByIdQuery(dto.id, id)); |
||
40 | } catch (e) { |
||
41 | throw new NotFoundException(e.message); |
||
42 | } |
||
45 |